package com.heima.utils.common;

import com.heima.model.wemedia.pojos.WmUser;

/**
 * @Description TODO
 * @Author bo.li
 * @Date 2023/3/16 10:12
 * @Version 1.0
 */
public class WmThreadLocalUtil {


    private final static ThreadLocal<WmUser> LOCAL = new ThreadLocal<>();

    public static void setUser(WmUser user){
        LOCAL.set(user);
    }


    public static WmUser getUser(){
        return LOCAL.get();
    }

    public static void remove(){
        LOCAL.remove();
    }
}